// index.js
Page({
  data: {
    list: [{
        img: '../../img/152709c1m5sjkkkom6fl60.jpg'
      },
      {
        img: '../../img/212809-1496323689c859.jpg'
      },
      {
        img: '../../img/wallhaven-g7o23q.jpg'
      },
    ],
    // 滑动图片的下标
    activeIndex: 0
  },
  // 滑动图片的时候拿到下标
  mychange(e) {

    let current = e.detail.current
    this.setData({
      activeIndex: current
    })
  },
  // 点击按钮
  mybtn(e) {
    let index = e.currentTarget.dataset.index
    this.setData({
      activeIndex: index
    })
  }
})